{template common/contentheader}
<div class="setcontent">
	<div class="settitle">
		<h3>{lang admin_misc_database:admin}</h3>
	</div>
	<div class="alert alert-info mt10">
		<span class="label label-info">{lang info:admin}</span>
		{lang admin_misc_database:admin}
	</div>
	<div class="setform">
			<form action="{url admin/dbbackup?act=outall}" method="post">
        		<button type="submit" class="btn btn-primary">{lang database_export:admin}</button>
			</form>
	</div>
	<div class="setform">
		<table class="table table-striped">
        <thead>
          <tr>
            <th>{lang database_table:admin}</th>
            <th>{lang database_engine:admin}</th>
            <th>{lang database_charset:admin}</th>
            <th>{lang database_memory:admin}</th>
            <th>{lang database_records:admin}</th>
            <th>{lang create_time:admin}</th>
            <th>{lang update_time:admin}</th>
            <th>{lang check_time:admin}</th> 
            <th>{lang database_scrap:admin}</th>
            <th>{lang th_operation:admin}</th>
          </tr>  
        </thead>
        <tbody>
     {loop $table['rs']  $d}
    <tr>
      <td>$d['TABLE_NAME']{if $d['TABLE_NAME']!=''}$d['TABLE_COMMENT']{/if}</td>
      <td>$d['ENGINE']</td>
        <td>$d['TABLE_COLLATION']</td>
        
         <td>$d['DATA_LENGTH']</td>
         <td>$d['TABLE_ROWS']</td>
        
        <td>$d['CREATE_TIME']</td>
        <td>$d['UPDATE_TIME']</td>
        <td>$d['CHECK_TIME']</td>
        <td>$d['DATA_FREE']</td>
        <td align="right">
      {if $d['DATA_FREE']!=0}
        <a href="{url admin/dbbackup?act=optimize&table=$d['TABLE_NAME']}">{lang database_optimize:admin}</a>
       {/if}
       {if $d['CHECK_TABLE']!='OK' && $d['CHECK_TABLE']!='NCHECK'}
          <a href="{url admin/dbbackup?act=repair&table=$d['TABLE_NAME']}">{lang database_repair:admin}</a>
       {/if}
       {if $d['DATA_FREE']==0 || $d['CHECK_TABLE']!='NCHECK'|| $d['CHECK_TABLE']!='OK'}
          <a href="{url admin/dbbackup?act=outone&table=$d['TABLE_NAME']}">{lang export:admin}</a>
       {/if}
        </td>
      </tr>
  
	{/loop}
	 <tr>
      <td>{lang total_tables:admin}:<strong>{$table['all_table']}</strong></td>
      <td></td>
        <td align="right">{lang database_memory:admin}:</td>
        
         <td>{$table['all_byte']}</td>
         <td> </td>
        <td> </td>
        
      <td> </td>
        <td align="right">{lang database_scrap:admin}:</td>
        <td>{$table['all_free']}</td>
        <td></td>
      </tr>
        </tbody>
		</table>
	</div>
</div>
{template common/contentfooter}